package com.ihrm.common.entity;


/**
 * 公共返回码
 */
public enum ResultCode {


    SUCCESS(true,1000,"操作成功"),
    FAIL(false,1001,"操作失败"),
    UNAUTHENTICATED(false,1002,"此操作需要登陆系统"),
    UNAUTHORISE(false,1003,"权限不足"),
    SERVER_ERROR(false,1004,"抱歉，系统繁忙请稍后重试");

    // 响应码
    int code;
    // 操作是否成功
    boolean success;
    // 返回信息
    String message;

    ResultCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
